<template>
  <div class="created-mainForm">
    <el-row>
      <dynForm :info-form="searchForm" :search-tags="searchTags" :select-list="selectList">
        <el-button
          type="primary"
          icon="el-icon-search"
        >
          {{ $t("search") }}</el-button
          >
        <el-button
          v-btnPermission:add
          type="primary"
          icon="el-icon-download"
        >
          {{ $t('export') }}</el-button
          >
      </dynForm>
    </el-row>
    <!-- 表单部分 -->
    <el-card>
      <el-row>
        <dynTable
          ref="dynTable"
          :loading="tableLoading"
          :table-data="tableData"
          :table-columns="tableColumns"
        />
      </el-row>
      <!--分页组件-->
      <pagination
        :total="total"
        :page.sync="listQuery.page"
        :size.sync="listQuery.size"
        @pagination="getList"
      />
    </el-card>
    <!-- 弹窗组件 -->
  </div>
</template>

<script>
import mySetting from '@/mixins/mySetting'
export default {
  name: 'CreatedMainForm',
  mixins: [mySetting],
  props: {},
  data() {
    return {
      searchForm: {},
      searchTags: [
        { label: this.$t('MaintenancePlanName'), prop: 'pmScheduleName', tag: 'DynInput' },
        { label: this.$t('eqpName'), prop: 'EqpName', tag: 'DynSelect' },
        { label: this.$t('nextPMDate'), prop: 'pmTypeId', tag: 'Dyndate' }
      ],
      selectList: {},
      tableColumns: [
        { prop: '', label: '', type: 'selection' },
        { prop: '', label: this.$t('index'), type: 'index', width: '50px', templete: (_scope) => {
          return (
            <span>{ (this.listQuery.page - 1) * this.listQuery.size + _scope.$index + 1 }</span>
          )
        } },
        { prop: 'pmScheduleName', label: this.$t('MaintenancePlanName') },
        { prop: 'pmTypeId', label: this.$t('pmTypeName') },
        { prop: 'formName', label: this.$t('equipmentType') },
        { prop: 'editTime', label: this.$t('eqpName') },
        { prop: 'pmLeastTime', label: this.$t('FormName') },
        { prop: 'notifyAdvanceDays', label: this.$t('NotificationofuserIDlist') },
        { prop: 'createTime', label: this.$t('nextPMDate') },
        { prop: '', label: this.$t('operation') }
      ],
      tableLoading: true
    }
  },
  watch: {},
  created() {
    this.tableLoading = false
  },
  mounted() {},
  methods: {}
}
</script>

<style scoped lang="scss">
@import "~@/assets/styles/defaultStyle.scss";
::v-deep .el-row:nth-child(1) {
  padding-bottom: 0;
}
</style>
